
LTC Tower Board Demonstration Suite Readme

-- Tha-An (Frank) Lin
Applications Engineering Intern
Linear Technology Corporation

September 14th 2010

Project File Listing

>>>>>>>>>>>>>>>>>>>>>>>>
main.h
main.c
>>>>>>>>>>
This file contains the MAIN task, which runs at the beginning to initialize everything.
Later it goes into a loop and is responsible for running the HTTP server, effectively becoming the HTTP task.

>>>>>>>>>>>>>>>>>>>>>>>>
Tasks.c
>>>>>>>>>>
This file contains the Task Listing for the entire program


>>>>>>>>>>>>>>>>>>>>>>>>
tfs_data.c
>>>>>>>>>>
This file contains the data for the Trivial File System, which is raw binary data.
The index.html that you see before a flash drive is plugged in is stored here.
Use the mktfs.bat script to make TFS data from the contents of the folder: web_pages.


>>>>>>>>>>>>>>>>>>>>>>>>
ltctwrutils.h
ltctwrutils.c
>>>>>>>>>>
This file contains the utilities used by the demo system.
Most importantly, it contains the initialization function to populate the LTCTWR_PARAMETER struct.
It also has a function that will return the pointer to the local struct, so other tasks may use the data.
Lastly, it contains a simple str2int function that will convert a string to an integer, useful for the demo.

Warning: this implementation does not contain any safeguards to two tasks trying to edit the same struct.
Care was taken to make sure only one task will write to the struct at any one given time.


>>>>>>>>>>>>>>>>>>>>>>>>
sampler.c
>>>>>>>>>>
This file contains the Sampler Task, which runs when needed and blocks itself when not.
This task works by waiting for the LTCTWR_PARAMETER struct to be populated with data and then is unblocked.

When unblocked, it creates a Timer task, and then queries the LTCTWR_PARAMETER struct to see which channels need to be read.
Opens a file pointer to Destination file and populates it with the first line

If necessary, it notes which channels need to be written to by opening a file pointer to the Source file.

The task then runs a loop for numsamples times:

	Find the sampling period, and then configures the timer accordingly.
	Read the source file to find DAC data.
	Query all the ADCs and write results to file.
	If required, Write source data to the DACs.
	Wait until timer is expired.

	If timer expires before the above is done, ignore it and write a debug message.

When everything is done, destroy Timer Task, and close all file pointers.



>>>>>>>>>>>>>>>>>>>>>>>>
ltctwrboard.h
ltctwrboard.c
>>>>>>>>>>
This file contains utilities that are integral to the XTWR-ADCDAC-LTC (TWR-ADCDAC-LTC) board.
Including a function that changes the decoder GPIO pins to pass the CS line to the appropriate device.
Note that this function depends on the structure of the LTCTWR_PARAMETER struct.
If not using that LTCTWR_PARAMETER struct, please rewrite this function and pass in the appropriate file pointers.

Also, it contain functions that will set up the SPI module in such a way to work with the parts on the board.
And functions that can change SPI parameters as needed.


>>>>>>>>>>>>>>>>>>>>>>>>
ltc1859.h
ltc1859.c
>>>>>>>>>>
This file contains the send/receive functions for the LTC 1859 ADC
The header file lists all the configuration options that can be passed in.


>>>>>>>>>>>>>>>>>>>>>>>>
ltc2498.h
ltc2498.c
>>>>>>>>>>
This file contains the send/receive functions for the LTC 2498 ADC
The header file lists all the configuration options that can be passed in.


>>>>>>>>>>>>>>>>>>>>>>>>
ltc2600.h
ltc2600.c
>>>>>>>>>>
This file contains the send/receive functions for the LTC 2600 DAC
The header file lists all the configuration options that can be passed in.



>>>>>>>>>>>>>>>>>>>>>>>>
ltc2704.h
ltc2704.c
>>>>>>>>>>
This file contains the send/receive functions for the LTC 2704 DAC
The header file lists all the configuration options that can be passed in.


>>>>>>>>>>>>>>>>>>>>>>>>
config.h
>>>>>>>>>>
Contains the Ethernet module configuration data.


>>>>>>>>>>>>>>>>>>>>>>>>
Shell_Task.c
>>>>>>>>>>
This file contains the Shell Function List (when the flash drive is plugged in), such as mkdir and cd.
Also, it contains the Shell_Task, which runs to maintain the shell interface over Serial


>>>>>>>>>>>>>>>>>>>>>>>>
cgi.h
cgi.c
>>>>>>>>>>
Contains the CGI function list, and the Function Link list.
Also, contains the usb_status_fn that tells the website whether a USB drive is connected or not.


>>>>>>>>>>>>>>>>>>>>>>>>
cgi-utils.c
>>>>>>>>>>
This file contains the utility functions used by the webpages, such as TCP/IP statistics and Real Time Clock data.

>>>>>>>>>>>>>>>>>>>>>>>>
cgi-ltctwr.c
>>>>>>>>>>
This file contains the CGI responder functions for all the IC configuration pages.

>>>>>>>>>>>>>>>>>>>>>>>>
cgi-datalogger.c
>>>>>>>>>>
This file contains the CGI responder function for the Datalogger / Sampler configuration page.


>>>>>>>>>>>>>>>>>>>>>>>>
cgi-thermocouple.c
>>>>>>>>>>
This file contains the CGI responder function for the Thermocouple Reader configuration page.

>>>>>>>>>>>>>>>>>>>>>>>>
Any file starting with USB
>>>>>>>>>>
This file is the pre-written USB file system code that comes bundled with MQX.
